package com.gotop.common.exception;


import com.gotop.common.enums.error.EnumClientError;

/**
 * Base异常抛出信息
 */
public class BaseException extends RuntimeException {

    public int code = 500;
    public String message;

    public BaseException(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public BaseException(EnumClientError error) {
        this.code = error.getCode();
        this.message = error.getMsg();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
